<?php
namespace app\components;

use yii\base\Component;
use Qcloud\Cos\Client;

class Cos extends Component
{
	public function client()
	{
		$client = new Client(\Yii::$app->params['qcloud']['cos']);
		return $client;
	}

	public function getListBuckets()
	{
		return $this->client()->listBuckets();
	}

	public function getList($data)
	{
		return $data;
	}

	public function __get($name)
	{
		return parent::__get($name);
	}
}